using System.ComponentModel.DataAnnotations;
using System.Data.Entity.ModelConfiguration;
using CSP.Model.CSP;

namespace CSP.DataAccess.Mapping
{
    public class ServiceInfoAgeGroupRelMap : EntityTypeConfiguration<ServiceInfoAgeGroupRel>
    {
        public ServiceInfoAgeGroupRelMap()
        {
            // Primary Key
            this.HasKey(t => t.id);

            // Properties
            // Table & Column Mappings
            this.ToTable("ServiceInfoAgeGroupRel");
            this.Property(t => t.id).HasColumnName("id");
            this.Property(t => t.AgeGroupId).HasColumnName("AgeGroupId");
            this.Property(t => t.ServiceInfoId).HasColumnName("ServiceInfoId");

            // Relationships
            //this.HasRequired(t => t.AgeGroup)
            //    .WithMany(t => t.ServiceInfoAgeGroupRels)
            //    .HasForeignKey(d => d.AgeGroupId);
            //this.HasRequired(t => t.ServiceInfo)
            //    .WithMany(t => t.ServiceInfoAgeGroupRels)
            //    .HasForeignKey(d => d.ServiceInfoId);

        }
    }
}
